|
|
<%
if not isempty(request("page")) and request("page")<>"" then
currentPage=cint(request("page"))
else
currentPage=1
end if
MaxPerPage=8 '###每页显示条数
sql="select * from book order by id desc"
rs.open sql,conn,1,1
if not rs.eof then
rs.pagesize=MaxPerPage '得到每页数
mpage=rs.pagecount '得到总页数
totalPut=rs.recordcount
if currentpage<1 then
currentpage=1
end if
rs.move (currentPage-1)*MaxPerPage
end if
if rs.eof and rs.bof then%>
<%else
k=(totalPut-MaxPerPage*(currentPage-1))+1
do while not rs.eof
k=k-1
ii=ii+1
if ii=2 then
ii=0
bg=" bgcolor=#F2F8FF"
bg2=" bgcolor=#FFFFFF"
else
bg=""
bg2=" bgcolor=#F2F8FF"
end if%>
|
|
|
|
<%=rs("name")%>
.gif">
第 <%=k%> 条留言 |
|
.gif" width="15" height="15">
<%if rs("show")="1" then%>
给站长的悄悄话...
<%else%>
<%=rs("ly")%>
<%end if%>
<%if rs("re")<>"" then%>
<%end if%>
|
<%=rs("time")%>
<%if rs("guestip")<>"" then%>
<%if adminok="ok" then%>
<%=rs("guestip")%>
<%else%>
<%=left(rs("guestip"),8)%>...
<%end if%>
<%end if%>
|
|
|
|
|
|
|
<%i=i+1
if i>=MaxPerPage then exit do
rs.movenext
loop
end if%>
|
|
|
|
留言总数:<%=rs.recordcount%>
每页<%=MaxPerPage%>条 [刷新] |
<%
pageno=currentPage
%>
<%if cint(pageno)>1 then%>
<%end if%>
9
<%if cint(pageno)>1 then%>
title="上一页">
<%end if%>
7
<%
pp=cint(pageno)-5
if pp<1 then
pp=1
end if
for pno=pp to mpage
p=p+1
if pno*1=cint(pageno)*1 then
%>
[<%=pno%>]
<%else%>
>[<%=pno%>]
<%end if%>
<%
if p>=11 then exit for
next%>
<%if cint(pageno)< mpage then%>
title="下一页">
<%end if%>
8
<%if cint(pageno)< mpage then%>
<%end if%>
: |
|
|
|
|
|
|
|
|